package com.jf.exam.service;

import com.jf.exam.pojo.vo.*;
import com.jf.exam.utils.PageBean;
import com.jf.exam.utils.Result;

import java.util.List;

/**
 * 操作题目的Service
 * 可以操作单选、多选、判断题
 */
public interface QuestionService {

    //查询单选和多选题的方法
    PageBean<QuestionListVO> listQuestionChoice(QuestionChoiceVO questionChoiceVO) throws Exception;


    //查询判断题的方法
    PageBean<QuestionListVO> listQuestionJudge(QuestionJudgeVO questionJudgeVO) throws Exception;

    //添加判断题
    Result addQuestionJudge(QuestionJudgeVO questionJudgeVO, String examId) throws Exception;

    //更新判断题
    Result updateQuestionJudge(QuestionJudgeVO questionJudgeVO);

    //添加选择题
    Result addQuestionChoice(QuestionChoiceVO questionChoiceVO, String examId) throws Exception;

    //更新选择题
    Result updateQuestionChoice(QuestionChoiceVO questionChoiceVO);

    PageBean<QuestionManageVO> listQuestionByExam(Integer eid, Integer pageCode, int pageSize, int navigatePages);

    //根据类型查询题目
    Result listAllByType(QuestionBankVO vo) throws Exception;

    //批量添加题目和试卷的关系
    Result addExamQuestion(List<ExamQuestionVO> vos, Integer examId);

    Result rate(Integer qid);
}
